<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>输出数组的长度</title>
</head>

<body>
    <script>
        var arr = new Array();
        arr[0] = "81";
        arr[1] = "82";
        arr[2] = "83";
        arr[3] = "98";
        arr[4] = "59";
        for (var i = 0; i < arr.length; i++) {
            console.log('第' + i + '位同学分数是：' + arr[i]);
        }
        console.log('数组长度为：' + arr.length);
    </script>
</body>

</html>